package main;

public class Test {

    public static void main(String[] args) {
        String name = "u=523024675,1399288021&fm=117&gp=0.jpg";
        String[] names = name.split("\\.");
        for (String s:names) {
            System.out.println(s);
        }
        String suffix = names[names.length-1];
        System.out.println(suffix);
    }
}
